#!/bin/sh

## hyphop ##

#= download and build config

[ "$OWN_REPO" ] || \
    OWN_REPO=khadas

DLBASE=https://github.com/$OWN_REPO/khadas-uboot/releases/download/tc

PKGS_DIR0=../packages
DOWNLOADS=../dl
OPT=../opt

BUILD=/tmp/khadas-uboot-build

## AArch64
GCC=gcc-arm-9.2-2019.12-x86_64-aarch64-none-linux-gnu
GCCZ=$GCC.tar.xz

## arm none eabi
GCCN=gcc-arm-9.2-2019.12-x86_64-arm-none-eabi
GCCZN=$GCCN.tar.xz

FIP=fip
FIPZ=$FIP-251220.tar.xz

ATF_RK3399_TAR_GZ=$DLBASE/atf-rk3399.tar.gz

ATF_BUILD=1		# arm-trust-frimware
#ATF_BUILD=RKBIN		# rkbin
#ATF_BUILD=

RKBIN_VERSION=5aa9a92b5652d37b323c870329103e120dfc8d87
RKBIN=rkbin
RKBIN0=rkbin-$RKBIN_VERSION
RKBINZ=$RKBIN_VERSION.tar.gz
RKBINZ2=rkbin-$RKBIN_VERSION.tar.gz
RKBIN_SRC=https://github.com/rockchip-linux/rkbin/archive/$RKBINZ
EXTRA_PATH=$BUILD/$GCCN/bin

NR_JOBS=16
PJ=-j$NR_JOBS

#DEF_CONFIG2=khadas-edge-captain-rk3399_defconfig
DEF_CONFIG2=khadas-edge-v-rk3399_defconfig

UBOOT_DIR1=/tmp
UBOOT_DIR2=/tmp/u-boot-mainline

UBOOT_VERSION=u-boot.version
UBOOT_SD_MMC0=u-boot.sd.bin
UBOOT_SD_MMC1=u-boot.mmc.bin
UBOOT_SD_MMC=u-boot.mmc.64.bin
UBOOT_SPI=u-boot.spi.bin

MAKE_IMAGE_URL=https://raw.githubusercontent.com/hyphop/khadas-rescue-tools/master/image/make_image
